package com.sc.byahi.user.client;

import java.util.List;
import java.util.Map;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.sc.byahi.user.shared.InitDataVO;
import com.sc.byahi.user.shared.Notice;
import com.sc.byahi.user.shared.Profile;
import com.sc.byahi.user.shared.ProfileOwner;
import com.sc.byahi.user.shared.ProfileVO;
import com.sc.byahi.user.shared.SearchBean;
import com.sc.byahi.user.shared.SuccessStory;
import com.sc.byahi.user.shared.constants.Lists;

/**
 * The async counterpart of <code>GreetingService</code>.
 */
public interface GreetingServiceAsync {
	void approveProfile(Long profileId, AsyncCallback<Boolean> callback);
	void disapproveProfile(Long profileId, AsyncCallback<Boolean> callback);
	void clearMemcache(AsyncCallback<Boolean> callback);
	void getMemcache(AsyncCallback<String> callback);
	void toggleMemcache(AsyncCallback<Boolean> callback);
	void findAdminUnapprovedProfiles(AsyncCallback<List<Long>> callback);
	void getUnsentEmails(AsyncCallback<Map<Long, String>> callback);
	void approveEmail(Long metadataId, AsyncCallback<Boolean> callback);
	void approveSuccessStory(Long id, AsyncCallback<Boolean> callback);

	void getInitData(AsyncCallback<InitDataVO> callback);
	/**
	 * Pass null if you want to find metadata for all profiles, otherwise send only selected IDs
	 * @param profiles
	 * @param callback
	 */
	void findMyInterestData(AsyncCallback<Map<Long, Map<Long, String>>> callback);

	void createProfile(Profile profile, AsyncCallback<Long> callback);
	void updateProfile(Profile profile, AsyncCallback<Void> callback);
	void deleteProfile(Long id, AsyncCallback<Boolean> callback);
	void findMyProfileIds(Boolean approved, AsyncCallback<List<Long>> callback);
	void findMyProfilesNamesByIds(AsyncCallback<Map<Long, String>> callback);
	void findMyProfilesById(List<Long> ids, AsyncCallback<List<Profile>> callback);
	void findPublicProfilesByIds(List<Long> ids, AsyncCallback<List<Profile>> callback);
	void findPublicProfileIdsByAgency(Long sampleId, AsyncCallback<List<Long>> callback);
	void findPublicProfileIds(SearchBean sb, AsyncCallback<List<Long>> callback);
	void findPublicProfilesMapDetailsByIds(List<Long> ids, AsyncCallback<List<ProfileVO>> callback);
	
	void interestShow(Long myProfileId, Long targetProfileId, AsyncCallback<Boolean> callback);
	void interestAccept(Long myProfileId, Long senderProfileId, AsyncCallback<Boolean> callback);
	void interestHold(Long myProfileId, Long senderProfileId, AsyncCallback<Boolean> callback);
	void rateProfile(Long targetProfileId, Long rating, AsyncCallback<Boolean> callback);

	void getUploadURL(AsyncCallback<String> asyncCallback);
	void getPublicUploadURL(AsyncCallback<String> asyncCallback);
	void updateProfileOwner(ProfileOwner owner, AsyncCallback<ProfileOwner> callback);
	void sendMessage(Long from, Long to, String body, AsyncCallback<Boolean> callback);
	void createTestProfiles(String gender, String data, AsyncCallback<String> callback);
	void setCurrentProfileId(Long currentProfileId, AsyncCallback<Map<Long, Long>> callback);
	void deleteProfileOwner(String gmailId, AsyncCallback<Boolean> callback);
	void verifyProfileIds(List<Long> ids, AsyncCallback<List<Long>> callback);

	void findSearchCriteria(String name, AsyncCallback<SearchBean> callback);
	void findSearchCriteriaNames(AsyncCallback<List<String>> callback);
	void saveSearchCriteria(SearchBean sb, AsyncCallback<Boolean> callback);
	void deleteSearchCriteria(String name, AsyncCallback<Void> callback);
	void createSuccessStory(SuccessStory story, AsyncCallback<Void> callback);
	void deleteSuccessStory(Long id, AsyncCallback<Boolean> callback);
	void getAllSuccessStories(AsyncCallback<List<Long>> callback);
	void getSuccessStories(List<Long> ids, AsyncCallback<List<SuccessStory>> callback);
	void publishNotice(Notice notice, AsyncCallback<Void> callback);
	void deleteNotice(AsyncCallback<Void> callback);
	void getLists(AsyncCallback<Map<Lists, Map<String, List<String>>>> callback);
	void toggleTestUpload(AsyncCallback<Boolean> asyncCallback);

}
